/**
 * 题目
 * 清空数组中的得到[]
*/

// 使用length属性
const arr1 = ['c','o','o','p','e','r']
arr1.length = 0
console.log(arr1)
// []

// 使用splice
const arr2 = ['c','o','o','p','e','r']
arr2.splice(0, arr2.length)
console.log(arr2)
// []

// 使用pop
const arr3 = ['c','o','o','p','e','r']
while(arr3.length > 0) arr3.pop()
console.log(arr3)
// []
